//
//  HttpTool.h
//  AI
//
//  Created by 甘世清 on 2023/7/15.
//

#import <Foundation/Foundation.h>
#import "BaseModel.h"
#import "AFNetworking.h"
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^httpSuccessBlock)(BaseModel *  httpModel);
typedef void (^httpFailBlock)(BaseModel *  httpModel, NSError*  __nullable error);
 
@interface HttpTool : NSObject
@property(nonatomic,strong)AFHTTPSessionManager *  httpManger;

+(HttpTool*)shareMZHttpTool;

/// get请求
/// @param urlString url
/// @param parameters 参数
/// @param successBlock  成功返回
/// @param failBlock 失败的返回
+(void)SQ_get:(NSString*)urlString ParamDic:(NSMutableDictionary*)parameters successBlock:(httpSuccessBlock)successBlock andFailBloc:(httpFailBlock)failBlock;

/// post请求
/// @param urlString url
/// @param parameters 参数
/// @param successBlock 成功的返回
/// @param failBlock 失败的返回
+(void)post:(NSString*)urlString paramDic:(NSMutableDictionary*)parameters  successBlock:(httpSuccessBlock)successBlock andFailBloc:(httpFailBlock)failBlock;
/// post请求
/// @param urlString url
/// @param parameters 参数
/// @param successBlock 成功的返回
/// @param failBlock 失败的返回
+(void)postJson:(NSString*)urlString paramDic:(NSMutableDictionary*)parameters  successBlock:(httpSuccessBlock)successBlock andFailBloc:(httpFailBlock)failBlock;
 
/// 上传图片
/// @param image 图片
/// @param successBlock 成功回调
/// @param failBlock 失败回调
+(void)SQ_Image:(UIImage*)image successBlock:(httpSuccessBlock)successBlock andFailBloc:(httpFailBlock)failBlock;


/// 上传视频
/// @param video 视频地址
/// @param successBlock 成功回调
/// @param failBlock 失败回调
+(void)SQ_Video:(NSString*)video successBlock:(httpSuccessBlock)successBlock andFailBloc:(httpFailBlock)failBlock;


@end

NS_ASSUME_NONNULL_END
